<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改tgmc客户产品列')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-tgmcusprolist-edit" th:object="${tgmcCusProList}">
            <input name="ID" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">产品类型：</label>
                <div class="col-sm-8">
                    <select name="partType" class="form-control m-b" th:with="type=${@dict.getType('commondata_part_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{partType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">客户名称：</label>
                <div class="col-sm-8">
                    <select name="customerName" class="form-control m-b" th:with="type=${cuslist}">
                        <option th:each="dict : ${type}" th:text="${dict.customerName}" th:value="${dict.customerName}" th:field="*{customerName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产品名称：</label>
                <div class="col-sm-8">
                    <input name="partName" th:field="*{partName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产品编码：</label>
                <div class="col-sm-8">
                    <input name="partCode" th:field="*{partCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">使用状态：</label>
                <div class="col-sm-8">
                    <select name="useStatus" class="form-control m-b" th:with="type=${@dict.getType('use_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{useStatus}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "commondata/tgmcusprolist";
        $("#form-tgmcusprolist-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-tgmcusprolist-edit').serialize());
            }
        }
    </script>
</body>
</html>